1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.google.common.collect.testing;
18
19 import com.google.common.annotations.GwtCompatible;
20 import com.google.common.collect.testing.SampleElements.Chars;
21
22 import java.util.List;
23
24
25
26
27
28
29
30 @GwtCompatible
31 public abstract class TestCharacterListGenerator
32 implements TestListGenerator<Character> {
33 @Override
34 public SampleElements<Character> samples() {
35 return new Chars();
36 }
37
38 @Override
39 public List<Character> create(Object... elements) {
40 Character[] array = new Character[elements.length];
41 int i = 0;
42 for (Object e : elements) {
43 array[i++] = (Character) e;
44 }
45 return create(array);
46 }
47
48
49
50
51
52 protected abstract List<Character> create(Character[] elements);
53
54 @Override
55 public Character[] createArray(int length) {
56 return new Character[length];
57 }
58
59
60 @Override
61 public List<Character> order(List<Character> insertionOrder) {
62 return insertionOrder;
63 }
64 }